/*    */ package com.yc.comm;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import javax.servlet.http.HttpServlet;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import javax.servlet.http.HttpSession;
/*    */ import org.apache.commons.logging.Log;
/*    */ import org.apache.commons.logging.LogFactory;
/*    */ 
/*    */ public class Logout extends HttpServlet
/*    */ {
/* 14 */   private static final Log log = LogFactory.getLog(Logout.class);
/*    */ 
/*    */   public void doGet(HttpServletRequest req, HttpServletResponse resp) {
/* 17 */     doPost(req, resp);
/*    */   }
/*    */ 
/*    */   public void doPost(HttpServletRequest req, HttpServletResponse resp)
/*    */   {
/* 22 */     if (req.getSession().getAttribute("stxtUName") != null)
/* 23 */       log.info("用户【" + req.getSession().getAttribute("stxtUName").toString() + "】从系统退出.");
/* 24 */     req.getSession().invalidate();
/*    */     try {
/* 26 */       resp.sendRedirect("/btsm/login.jsp");
/*    */     }
/*    */     catch (IOException e) {
/* 29 */       e.printStackTrace();
/*    */     }
/*    */   }
/*    */ }

/* Location:           E:\java\apache-tomcat-6.0.36\webapps\btsm\WEB-INF\classes\
 * Qualified Name:     com.yc.comm.Logout
 * JD-Core Version:    0.6.2
 */